﻿@model  P2PWeb.Models.Pager<P2PWeb.Models.Account>
@using P2PWeb.Controllers;
@using P2PWeb.Common
@using P2PWeb;


<table cellpadding="0" cellspacing="0" width="100%">
    <tbody>
        <tr class="total_th">
            <th class="name">用户编号</th>
            <th>用户名称</th>
            <th>手机</th>
            <th>E-mail</th>
            <th class="last_th">操作</th>
        </tr>
        <tr class="">
            <th colspan="6">&nbsp;</th>
        </tr>

        @foreach (P2PWeb.Models.Account account in Model.Items)
        {
            <tr class="first_td">
                <td class="left_td">@account.ID
                </td>
                <td>@account.Name</td>
                <td>@account.Mobile</td>
                <td>@account.Email</td>
                <td>
                    @if (account.IsDel)
                    {
                        @*<a href="/Agent/UpdateAccountIsDel?id=@account.ID">启用</a>*@
                        <a href="javascript:return false;">绑定代理商</a>
                    }
                    else
                    {
                        @*<a href="/Agent/UpdateAccountIsDel?id=@account.ID">禁用</a>*@
                       <a href="/Agent/AccountAndAgentList?id=@account.ID">绑定代理商</a>
                    }
                </td>
            </tr>
        }
    </tbody>
</table>

<div id="navDiv" class="loan_page">

    <script>
        $(document).ready(function () {
            var currentborrowStateValues= [];
            $(":checkbox[name=borrowStateValues]:checked").each(function(){
                currentborrowStateValues.push($(this).val());
            });

            var currentborrowStateValuesJson={};
            for(var index in currentborrowStateValues)
            {
                currentborrowStateValuesJson[index]=currentborrowStateValues[index];
            }

            MakerNavs('Agent','BindAgent',@Model.CurrentPageIndex,@Model.TotialPaqgerCount,@Model.Items.Count,@Model.TotialItemsCount,'navDiv','borrowsContainer',{BorrowStateValues:currentborrowStateValuesJson});
        });
    </script>
</div>
